<div class="info">
<h1 class="font_h1">Tạo mới trang</h1>
<?php if(isset($error))  : ?>
<h2 class="error_red"><?php echo $error;?></h2>
<?php endif;?>
<form action="<?php echo base_url().'admin/page/add/'.@$uid?>" method="POST" enctype="multipart/form-data" id="frm_add">
<table class="table1">
    <tr>
                <td width="20%">Tên trang: </td>
                <td width="80%">
                 <?php if(@$pages->title!='') {?>
                <input type="text" name="txt_title" style="width:400px" value="<?php echo $pages->title;?>"  />
                <?php } else {?>
               <input type="text" name="txt_title" style="width:400px" value=""  />
                <?php } ?>  
               
                   
                </td>
    </tr>  
     <tr>
                <td width="20%">Tiêu đề trang: </td>
                <td width="80%">
                 <?php if(@$pages->heading!='') {?>
                <input type="text" name="txt_heading" style="width:400px" value="<?php echo $pages->heading;?>"  />
                <?php } else {?>
               <input type="text" name="txt_heading" style="width:400px" value="<?php set_value('txt_heading');?>"  />
                <?php } ?>    
                </td>
    </tr>   
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_heading');?></span>
                </td>
    </tr> 
     
    <tr>
                <td width="20%">Meta Keywords: </td>
                <td width="80%">
                <?php if(@$pages->meta_keyword!='') {?>
                <textarea name="txt_meta_keyword" style="width:400px; height:150px"><?php echo @$pages->meta_keyword?></textarea>
                <?php } else {?>
               <textarea name="txt_meta_keyword" style="width:400px; height:150px"></textarea>
                <?php } ?>    
                
                   
                </td>
    </tr> 
     <tr>
                <td width="20%">Meta Descriptions:</td>
                <td width="80%">
                <?php if(@$pages->meta_description!='') {?>
                <textarea name="txt_meta_description" style="width:400px; height:150px"><?php echo @$pages->meta_description?></textarea>
                <?php } else {?>
               <textarea name="txt_meta_description" style="width:400px; height:150px"></textarea>
                <?php } ?>
                
                   
                </td>
    </tr> 
     <tr>
                <td width="20%">Nội dung:</td>
                <td width="80%">
                 <?php if(@$pages->description!='') {?>
                <textarea name="txt_body" class="ckeditor" style="width:400px; height:150px"><?php echo @$pages->description?></textarea>
                <?php } else {?>
               <textarea name="txt_body" class="ckeditor" style="width:400px; height:150px"></textarea>
                <?php } ?>

                   
                </td>
    </tr> 
     <tr>
                <td width="20%">Sắp xếp: </td>
                <td width="80%">
                <?php if(@$pages->order_page!='') {?>
                <input type="text" name="txt_order" style="width:20px" value="<?php echo $pages->order_page;?>"  />
                <?php } else {?>
               <input type="text" name="txt_order" style="width:20px" value=""  />
                <?php } ?>
              
                </td>
    </tr>   
     <tr>
                <td width="20%">Actvie/No active</td>
                <td width="80%">
                <input type="checkbox" name="txt_active" value="1" <?php if(@$pages->active == '1') echo "checked"?>/>
                   
                </td>
    </tr> 
   
    <tr>
                <td width="20%"></td>
                <td width="80%">
                <a  class="button" onclick="$('#frm_add').submit()" href="javascript:void(0)">Lưu lại</a>
                 <a  class="button" href="<?php echo base_url().'admin/page'?>">Quay lại</a>
                 
                </td>
    </tr>
</table>
</form>
</div>